﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Objects;

namespace EntityNorthwind
{
    public partial class Order
    {
        public override string ToString()
        {
            return this.OrderID.ToString();
        }
    }

    public partial class Employee
    {
        public override string ToString()
        {
            return this.FirstName + " " + this.LastName;
        }
    }

    public partial class Order
    {
        public OrderDetail AddOrderDetail(int productID, decimal unitPrice,short quantity,float discount)
        {
            OrderDetail detail = new OrderDetail(OrderID, productID, unitPrice, quantity, discount);
            this.ObjectContextBase.AddObject(detail);
            return detail;
        }
        
        
    }
}
